home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Games Machine 76
/
XENIATGM66.iso
/
Indiana Jones
/
Indiana Jones.exe
/
RESOURCE
/
PREVIEW.GOB
/
cog_gen_watersplash.cog
< prev
next >
Wrap
Text File
|
1999-11-15
|
3KB
|
119 lines
# Jones 3D Cog Script
#
# GEN_WaterSplash.cog
#
# Attach to a ghost object.
#
# [TRM]
#
# (C) 1999 LucasArts Entertainment Co. All Rights Reserved
# ========================================================================================
symbols
message startup
#message sighted
message timer
thing origin # Where the bubbles are coming from
thing wave local
thing player local
template splash0=+ripples2 local
template splash1=+ripples local
template splash2=+ripples local
#template splash0=+bubbles2 local
#template splash1=+bubbles2 local
#template splash2=+bubbles2 local
vector vecPos local
vector startWave local
vector finWave local
int i=0 local
int waves=5 local
int randNum local
int waves_On=0 local
flex fin_XY local
end
# ========================================================================================
code
startup:
SetTimer(0.5);
#AnimateSpriteSize(origin, '2.0 3.0 0.0', '3.0 4.0 0.0', 10.1);
return;
# ========================================================================================
#sighted:
# player = GetLocalPlayerThing();
# Sleep(0.01);
# Print("sighted");
# if((HasLOS(player, origin)) && (waves_On == 0))
# {
# #Sleep(Rand() + RandBetween(1, 3));
# waves_On = 1;
# SetTimer(0.5);
# }
# return;
# ========================================================================================
timer:
vecPos = VectorSet(rand()*0.15, rand()*0.15, 0);
randNum = RandBetween(1, 3);
if(randNum == 1) fin_XY = 0.1;
else if(randNum == 2) fin_XY = 0.3;
else if(randNum == 3) fin_XY = -0.05;
for(i=0; i<waves; i=i+1)
{
#PrintInt(i);
wave = CreateThingAtPos(splash0[RandBetween(0, 2)], GetThingSector(origin), VectorAdd(GetThingPos(origin), VectorAdd('-0.025 -0.035 0.0', vecPos)), '0 0 0');
CaptureThing(wave);
startWave = VectorSet(0.01, 0.01, 1.0);
finWave = VectorSet(0.15+fin_XY, 0.15+fin_XY, 0.0);
AnimateSpriteSize(wave, startWave, finWave, 1.3);
#ThingFadeAnim(wave, 1.0, 0.5, 1.0, 0);
}
#if(HasLOS(player, origin))
#{
# waves_On = 0;
SetTimer(0.5);
#}
#if(!HasLOS(player, origin))
#{
# Print("no LOS");
# waves_On = 0;
# ClearThingFlags(origin, 0x100000); # mark thing as unseen
#}
return;
# ========================================================================================
end